package com.rescueworkers.dto;

import android.content.ContentValues;
import android.database.Cursor;

public class UploadVoiceOrImageInfo {
	private String id;
	private String uuid;
	private String no;
	private int type;
	private String path;
	private String latitude;
	private String longitude;
	private long acquisition_at;
	private int uploadFlag;
	private int recordTime;//录音时长
	private String fileName;

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public long getAcquisition_at() {
		return acquisition_at;
	}

	public void setAcquisition_at(long acquisition_at) {
		this.acquisition_at = acquisition_at;
	}

	public int getUploadFlag() {
		return uploadFlag;
	}

	public void setUploadFlag(int uploadFlag) {
		this.uploadFlag = uploadFlag;
	}

	
	
	public void fromCusor(Cursor cursor) {
        id = cursor.getString(cursor.getColumnIndex("id"));
        no = cursor.getString(cursor.getColumnIndex("no"));
        uuid = cursor.getString(cursor.getColumnIndex("uuid"));
        path = cursor.getString(cursor.getColumnIndex("path"));
        longitude = cursor.getString(cursor.getColumnIndex("longitude"));
        latitude = cursor.getString(cursor.getColumnIndex("latitude"));
        acquisition_at = cursor.getLong(cursor.getColumnIndex("acquisition_at"));
        type = cursor.getInt(cursor.getColumnIndex("type"));
        uploadFlag = cursor.getInt(cursor.getColumnIndex("uploadFlag"));
        fileName = cursor.getString(cursor.getColumnIndex("fileName"));
	}
	
	public ContentValues fromData() {
        ContentValues values = new ContentValues();
        values.put("id", id);
        values.put("uuid", uuid);
        values.put("no", no);
        values.put("path", path);
        values.put("longitude", longitude);
        values.put("latitude", latitude);
        values.put("acquisition_at", acquisition_at);
        values.put("type", type);
        values.put("uploadFlag", uploadFlag);
        values.put("fileName", fileName);
        return values;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public int getRecordTime() {
		return recordTime;
	}

	public void setRecordTime(int recordTime) {
		this.recordTime = recordTime;
	}
}
